package com.PuzGame.combinenumbers;

import java.util.Calendar;
import java.util.Date;

import android.content.Context;

import com.PuzGame.combinenumbers.ServerCommunication.GetAndPostItems.GetPost_Challenge;

public class ChallengeeLevel extends ChallengerLevel
{
	private Date DateOfExpirecy;
	private long ChallengeId;
	
	
	public ChallengeeLevel(GetPost_Challenge.Challenge objres) {
		super(objres.senderUserId, objres.receiverUserId,objres.difficultyLevel,objres.goal,objres.numbers,"",null);
		
		ChallengeId = objres.challengeId;
		Type = LevelType.CHALLENGEE;
		Calendar cal = Calendar.getInstance();
		cal.setTime(new Date());
		cal.add(Calendar.SECOND, objres.timeInSeconds);
		DateOfExpirecy = cal.getTime();
	}
	
	public ChallengeeLevel(ChallengeeLevel restoredLevel, Context c) {
		super(restoredLevel,  c);
		ChallengeId = restoredLevel.ChallengeId;
		Type = LevelType.CHALLENGEE;

		DateOfExpirecy = restoredLevel.DateOfExpirecy;
	}

	public Date getDateOfExpirecy() {
		// TODO Auto-generated method stub
		return DateOfExpirecy;
	}

	public long getChallengeId() {
		return ChallengeId;
	}

	public void setChallengeId(long iD) {
		ChallengeId = iD;
	}
	

	
	
	

	
}
